package com.test.ssm.service.impl;

import com.test.ssm.dao.OrderDAO;
import com.test.ssm.pojo.HotelOrder;
import com.test.ssm.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 徒有琴
 */
@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderDAO orderDAO;

    @Override
    public List<HotelOrder> getOrderList() {
        return orderDAO.getOrderList();
    }

    @Override
    public HotelOrder getOrderById(Integer id) {
        return orderDAO.getOrderById(id);
    }

    @Override
    public HotelOrder getOrderByNum(String orderNum) {
        return orderDAO.getOrderByNum(orderNum);
    }

    @Override
    public void updateOrder(HotelOrder order) {
        orderDAO.updateOrder(order);
    }
}
